<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%--
  Created by IntelliJ IDEA.
  User: kukudechao
  Date: 2018/8/11
  Time: 17:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  isELIgnored="false" %>
<html>
<head>
    <title>Title</title>

    <link rel="stylesheet" type="text/css" href="css/dorCompare.css"/>
</head>
<body>
<div id="biaoge">
    <table class="dataintable">
        <tr>
            <td>宿舍楼号</td>

            <td>房间号</td>

            <td>分数</td>

            <td>排名</td>

        </tr>
        <c:forEach var="item" items="${sessionScope.list}">
        <tr>
            <td>${item.dor_build}</td>
            <td>${item.dor_no}</td>
            <td>${item.qua_mark}</td>
            <td>${item.r}</td>
        </tr>

        </c:forEach>

    </table>
</div>
<div id="foot">
    ${sessionScope.pageIndex}/${sessionScope.pageNum}

    <c:if test="${sessionScope.pageIndex==1}">
        首页
        上一页
    </c:if>
    <c:if test="${sessionScope.pageIndex>1}">
        <a href="${pageContext.request.contextPath}/DorCompareServlet.do?pageIndex=1">首页</a>
        <a href="${pageContext.request.contextPath}/DorCompareServlet.do?pageIndex=${sessionScope.pageIndex-1}">上一页</a>
    </c:if>
    <c:if test="${sessionScope.pageIndex<sessionScope.pageNum}">
        <a href="${pageContext.request.contextPath}/DorCompareServlet.do?pageIndex=${sessionScope.pageIndex+1}">下一页</a>
        <a href="${pageContext.request.contextPath}/DorCompareServlet.do?pageIndex=${sessionScope.pageNum}">尾页</a>
    </c:if>
    <c:if test="${sessionScope.pageIndex==sessionScope.pageNum}">
        下一页
        尾页
    </c:if>
</div>

</body>
</html>
